From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Tue Mar 14 23:21:46 2006 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10@yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10@yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10@yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10@yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx@linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Tue Mar 28 18:25:05 2006 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:05 2006 Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 18:25:05 2006 Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:05 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 18:25:05 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:05 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10@yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 18:25:05 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10@yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:05 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10@yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10@yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx@linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Tue Mar 28 20:17:06 2006 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10@yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10@yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10@yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10@yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx@linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to whe