From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From bogus@does.not.exist.com Mon Jul 5 09:00:41 2010 From: bogus@does.not.exist.com () Date: Mon, 05 Jul 2010 15:00:41 -0000 Subject: No subject Message-ID: does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> >=20 > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From n.zrelli at tu-bs.de Thu Jul 29 18:41:11 2010 From: n.zrelli at tu-bs.de (Nejd Zrelli) Date: Fri, 30 Jul 2010 02:41:11 +0200 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) Message-ID: <4C521FA7.1080803@tu-bs.de> Hi all, I'm using the RxTxcomm library in a project about train recognition system. I communicate with the virtual serial port to send commands to the hardware. To avoid polling the serial port i used the event based alternative to trigger the reading. For any command i send, i get a response. To increase the responses frequency's without overrunning the buffer i tried to trigger the writing to the serial port within the serial event. The strange thing i get is that the serialEvent() will be partially executed!! some instructions will be simply ignored! i don't know why.. - is there a solution or a workaround to avoid this problem ? Thanks in advance! Zrelli From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From n.zrelli at tu-bs.de Thu Jul 29 18:41:11 2010 From: n.zrelli at tu-bs.de (Nejd Zrelli) Date: Fri, 30 Jul 2010 02:41:11 +0200 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) Message-ID: <4C521FA7.1080803@tu-bs.de> Hi all, I'm using the RxTxcomm library in a project about train recognition system. I communicate with the virtual serial port to send commands to the hardware. To avoid polling the serial port i used the event based alternative to trigger the reading. For any command i send, i get a response. To increase the responses frequency's without overrunning the buffer i tried to trigger the writing to the serial port within the serial event. The strange thing i get is that the serialEvent() will be partially executed!! some instructions will be simply ignored! i don't know why.. - is there a solution or a workaround to avoid this problem ? Thanks in advance! Zrelli From invite+zrdoi=fgeerf at facebookmail.com Fri Jul 30 11:59:46 2010 From: invite+zrdoi=fgeerf at facebookmail.com (Arnab Bhaumik) Date: Fri, 30 Jul 2010 10:59:46 -0700 Subject: [Rxtx] Check out my photos on Facebook Message-ID: I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Arnab To sign up for Facebook, follow the link below: http://www.facebook.com/p.php?i=100001436287276&k=Z6E3Y6SXS3V14EBJPB63QUUPRTAD34ZNUWHQFBW1RU&r Already have an account? Add this email address to your account: http://www.facebook.com/n/?merge_accounts.php&e=rxtx%40qbang.org&c=26d707a30a6962147b5354a8abe0a7fe ======================================= rxtx at qbang.org was invited to join Facebook by Arnab Bhaumik. If you do not wish to receive this type of email from Facebook in the future, please click on the link below to unsubscribe. http://www.facebook.com/o.php?k=3ecb54&u=100001431127305&mid=2bd1040G5af365c78509G0G8 Facebook, Inc. P.O. Box 10005, Palo Alto, CA 94303 -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 30 12:32:53 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 30 Jul 2010 19:32:53 +0100 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) In-Reply-To: <4C521FA7.1080803@tu-bs.de> References: <4C521FA7.1080803@tu-bs.de> Message-ID: On 30 July 2010 01:41, Nejd Zrelli wrote: > The strange thing i > get is that the serialEvent() will be partially executed!! ?some > instructions will be simply ignored! i don't know why.. Hi Zrelli, Do you mean that the serialEvent is triggered prior to a complete message being received? That is entirely probable and you should structure your data received handler to cope with that. Every protocol handler I write takes the form of a state machine: bytes come in and messages come out -- this is a general purpose pattern for all structured communications, be it serial, TCP/IP, or what have you. BTW: if you protocol required data sends at regular periods then use a separate thread rather than abusing the event handler thread. Use timeouts appropriate to the devices that are communicating. Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From n.zrelli at tu-bs.de Thu Jul 29 18:41:11 2010 From: n.zrelli at tu-bs.de (Nejd Zrelli) Date: Fri, 30 Jul 2010 02:41:11 +0200 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) Message-ID: <4C521FA7.1080803@tu-bs.de> Hi all, I'm using the RxTxcomm library in a project about train recognition system. I communicate with the virtual serial port to send commands to the hardware. To avoid polling the serial port i used the event based alternative to trigger the reading. For any command i send, i get a response. To increase the responses frequency's without overrunning the buffer i tried to trigger the writing to the serial port within the serial event. The strange thing i get is that the serialEvent() will be partially executed!! some instructions will be simply ignored! i don't know why.. - is there a solution or a workaround to avoid this problem ? Thanks in advance! Zrelli From invite+zrdoi=fgeerf at facebookmail.com Fri Jul 30 11:59:46 2010 From: invite+zrdoi=fgeerf at facebookmail.com (Arnab Bhaumik) Date: Fri, 30 Jul 2010 10:59:46 -0700 Subject: [Rxtx] Check out my photos on Facebook Message-ID: I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Arnab To sign up for Facebook, follow the link below: http://www.facebook.com/p.php?i=100001436287276&k=Z6E3Y6SXS3V14EBJPB63QUUPRTAD34ZNUWHQFBW1RU&r Already have an account? Add this email address to your account: http://www.facebook.com/n/?merge_accounts.php&e=rxtx%40qbang.org&c=26d707a30a6962147b5354a8abe0a7fe ======================================= rxtx at qbang.org was invited to join Facebook by Arnab Bhaumik. If you do not wish to receive this type of email from Facebook in the future, please click on the link below to unsubscribe. http://www.facebook.com/o.php?k=3ecb54&u=100001431127305&mid=2bd1040G5af365c78509G0G8 Facebook, Inc. P.O. Box 10005, Palo Alto, CA 94303 -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 30 12:32:53 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 30 Jul 2010 19:32:53 +0100 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) In-Reply-To: <4C521FA7.1080803@tu-bs.de> References: <4C521FA7.1080803@tu-bs.de> Message-ID: On 30 July 2010 01:41, Nejd Zrelli wrote: > The strange thing i > get is that the serialEvent() will be partially executed!! ?some > instructions will be simply ignored! i don't know why.. Hi Zrelli, Do you mean that the serialEvent is triggered prior to a complete message being received? That is entirely probable and you should structure your data received handler to cope with that. Every protocol handler I write takes the form of a state machine: bytes come in and messages come out -- this is a general purpose pattern for all structured communications, be it serial, TCP/IP, or what have you. BTW: if you protocol required data sends at regular periods then use a separate thread rather than abusing the event handler thread. Use timeouts appropriate to the devices that are communicating. Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From n.zrelli at tu-bs.de Thu Jul 29 18:41:11 2010 From: n.zrelli at tu-bs.de (Nejd Zrelli) Date: Fri, 30 Jul 2010 02:41:11 +0200 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) Message-ID: <4C521FA7.1080803@tu-bs.de> Hi all, I'm using the RxTxcomm library in a project about train recognition system. I communicate with the virtual serial port to send commands to the hardware. To avoid polling the serial port i used the event based alternative to trigger the reading. For any command i send, i get a response. To increase the responses frequency's without overrunning the buffer i tried to trigger the writing to the serial port within the serial event. The strange thing i get is that the serialEvent() will be partially executed!! some instructions will be simply ignored! i don't know why.. - is there a solution or a workaround to avoid this problem ? Thanks in advance! Zrelli From invite+zrdoi=fgeerf at facebookmail.com Fri Jul 30 11:59:46 2010 From: invite+zrdoi=fgeerf at facebookmail.com (Arnab Bhaumik) Date: Fri, 30 Jul 2010 10:59:46 -0700 Subject: [Rxtx] Check out my photos on Facebook Message-ID: I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Arnab To sign up for Facebook, follow the link below: http://www.facebook.com/p.php?i=100001436287276&k=Z6E3Y6SXS3V14EBJPB63QUUPRTAD34ZNUWHQFBW1RU&r Already have an account? Add this email address to your account: http://www.facebook.com/n/?merge_accounts.php&e=rxtx%40qbang.org&c=26d707a30a6962147b5354a8abe0a7fe ======================================= rxtx at qbang.org was invited to join Facebook by Arnab Bhaumik. If you do not wish to receive this type of email from Facebook in the future, please click on the link below to unsubscribe. http://www.facebook.com/o.php?k=3ecb54&u=100001431127305&mid=2bd1040G5af365c78509G0G8 Facebook, Inc. P.O. Box 10005, Palo Alto, CA 94303 -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 30 12:32:53 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 30 Jul 2010 19:32:53 +0100 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) In-Reply-To: <4C521FA7.1080803@tu-bs.de> References: <4C521FA7.1080803@tu-bs.de> Message-ID: On 30 July 2010 01:41, Nejd Zrelli wrote: > The strange thing i > get is that the serialEvent() will be partially executed!! ?some > instructions will be simply ignored! i don't know why.. Hi Zrelli, Do you mean that the serialEvent is triggered prior to a complete message being received? That is entirely probable and you should structure your data received handler to cope with that. Every protocol handler I write takes the form of a state machine: bytes come in and messages come out -- this is a general purpose pattern for all structured communications, be it serial, TCP/IP, or what have you. BTW: if you protocol required data sends at regular periods then use a separate thread rather than abusing the event handler thread. Use timeouts appropriate to the devices that are communicating. Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From andy at g0poy.com Mon Jul 12 06:47:37 2010 From: andy at g0poy.com (Andy Eskelson) Date: Mon, 12 Jul 2010 13:47:37 +0100 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: <20100712134737.330b21c8@workstation.site> Check the permissions, some distros (SUSE in my case) only allow root to access the ports. You may need to tweak or add a udev rule to change the permissions, Andy On Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > > To: rxtx at qbang.org, "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. Java > > program X > > > is not a complicated system.. I use the term X in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to printer > > > epson > > > > tm88IV using ISA serial port which is internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > > I have known and am able to access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From santosh.ry at gmail.com Mon Jul 12 06:57:13 2010 From: santosh.ry at gmail.com (Santosh) Date: Mon, 12 Jul 2010 08:57:13 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <581477.29493.qm@web76801.mail.sg1.yahoo.com> References: <801250.71832.qm@web76815.mail.sg1.yahoo.com> <581477.29493.qm@web76801.mail.sg1.yahoo.com> Message-ID: Ferry, Did you make sure that you have proper permission assigned to device nodes? You may use chmod to alter permissions. Thanks. On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap wrote: > Hello guys, finally I added parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Sunday, July 11, 2010, 3:07 AM >> Thank you very much Mariusz.. >> Now I understand what the problem is. >> Thank you very much. >> >> Regards, >> >> Ferry >> >> --- On Sun, 7/11/10, M.Dec-GM >> wrote: >> >> > From: M.Dec-GM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: "Ferry Sumendap" , >> rxtx at qbang.org >> > Date: Sunday, July 11, 2010, 2:10 AM >> > This thread >> > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> >> > >> > >> > Regards >> > Mariusz >> > >> > ----- Original Message ----- >> > From: "Ferry Sumendap" >> > To: ; >> > "M.Dec-GM" >> > Sent: Sunday, July 11, 2010 10:48 AM >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java >> > program >> > >> > >> > I am sorry sir... >> > What I mean with java program X is actually the >> sample >> > program how to access serial port using rxtx. Java >> program X >> > is not a complicated system.. I use the term X in >> order to >> > simplify the language of speaking. >> > >> > Can you give url to access your lastweek post ? >> > >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > >> > >> > >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 1:33 AM >> > > Hi, >> > > Did you read my post? >> > > >> > > Look for examples and obtain a list of available >> ports >> > in >> > > RXTX. >> > > If your port will be not available on standard >> list, >> > check >> > > RXTX source, add a line with your ID and >> everything >> > will >> > > work. >> > > >> > > Nobody can do it in your system. >> > > In my two posts and discussions about port ID's >> from >> > few >> > > weeks ago you have EVERYTHING to do it in your >> system, >> > so >> > > more questions will not help more. >> > > Simply do it. >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GMail" >> > > Sent: Sunday, July 11, 2010 10:16 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I use java program X to print 'hello' to printer >> > epson >> > > tm88IV using ISA serial port which is internally >> > inside >> > > motherboard and it works successfully. >> > > But when come to /dev/ttyD0, java program X >> cannot >> > access >> > > (even to open the port /dev/ttyD0). >> > > >> > > After that, I executed : >> > >? rm -rf /dev/ttyS1 >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > >? rm -rf /dev/ttyS2 >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > >> > > But when I want to test using java program X, >> the >> > program >> > > can access /dev/ttyS1 but it doesn't print >> 'hello' but >> > it >> > > prints figures I am not expecting it. >> > > >> > > >> > > Any help would be appreciated much. >> > > Thank you. >> > > >> > > Regards, >> > > Ferry >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GMail >> > > wrote: >> > > >> > > > From: M.Dec-GMail >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > Hi, >> > > > what for so complicated actions and what >> does it >> > mean >> > > "but >> > > > it is not stable" ???? >> > > > "Not stable" may means that system crashes >> or >> > that >> > > port >> > > > disconnects..... >> > > > >> > > > Read carefully examples how to use RXTX (i.e >> com >> > port >> > > > list). >> > > > Few weeks ago was discussion about not >> visible >> > USB VCP >> > > port >> > > > id and how to solve this very little >> problem. >> > > > Regards >> > > > Mariusz >> > > > >> > > > >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: >> > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > Subject: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > > program >> > > > >> > > > >> > > > > Hello guys, I have just bought external >> PCI >> > IO >> > > (2 >> > > > serial + 1 pararel) Moschip MCS9865IV-AA. >> > > > > I have known and am able to access >> > /dev/ttyS0 >> > > > (ordinary serial port) but this external PCI >> IO, >> > > after >> > > > installation, it will create /dev/ttyD0 and >> > > /dev/ttyD1 >> > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > >> > > > > I have tried to execute >> > > > > rm -rf /dev/ttyS1 >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > rm -rf /dev/ttyS2 >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > >> > > > > and tried to access /dev/ttyS1 and >> > /dev/ttyS2 but >> > > it >> > > > is not stable on Linux Mandriva 2009.1 >> kernel >> > version >> > > > 2.6.27. >> > > > > >> > > > > Any other solution please ? >> > > > > Thank you. >> > > > > >> > > > > >> > > > > Regards, >> > > > > Ferry >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > _______________________________________________ >> > > > > Rxtx mailing list >> > > > > Rxtx at qbang.org >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > >> > > >> > > > > >> > > >> > > >> > > >> > >> > >> > >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 07:01:54 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 21:01:54 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <358939.94958.qm@web76810.mail.sg1.yahoo.com> Thank you for all your responses. After doing ls -l /dev/ttyD* I can see that dialout group must be added to the ordinary user to be able to access the serial port. Thank you very much. Regards, Ferry --- On Mon, 7/12/10, Santosh wrote: > From: Santosh > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" > Cc: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 5:57 AM > Ferry, > > Did you make sure that you have proper permission assigned > to device nodes? > You may use chmod to alter permissions. > > Thanks. > > On Mon, Jul 12, 2010 at 7:47 AM, Ferry Sumendap > wrote: > > Hello guys, finally I added parameter > > > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > > > and now the java program can access /dev/ttyD0 but > only for root user not for ordinary user (non root). > > > > Does anyone know why this happen ? I need that > ordinary user to be able to access the external serial > port. > > Thank you very much. > > > > > > Regards, > > Ferry > > > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > >> From: Ferry Sumendap > >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > >> To: rxtx at qbang.org, > "M.Dec-GM" > >> Date: Sunday, July 11, 2010, 3:07 AM > >> Thank you very much Mariusz.. > >> Now I understand what the problem is. > >> Thank you very much. > >> > >> Regards, > >> > >> Ferry > >> > >> --- On Sun, 7/11/10, M.Dec-GM > >> wrote: > >> > >> > From: M.Dec-GM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java program > >> > To: "Ferry Sumendap" , > >> rxtx at qbang.org > >> > Date: Sunday, July 11, 2010, 2:10 AM > >> > This thread > >> > > >> > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > >> > >> > > >> > > >> > Regards > >> > Mariusz > >> > > >> > ----- Original Message ----- > >> > From: "Ferry Sumendap" > >> > To: ; > >> > "M.Dec-GM" > >> > Sent: Sunday, July 11, 2010 10:48 AM > >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > >> java > >> > program > >> > > >> > > >> > I am sorry sir... > >> > What I mean with java program X is actually > the > >> sample > >> > program how to access serial port using rxtx. > Java > >> program X > >> > is not a complicated system.. I use the term > X in > >> order to > >> > simplify the language of speaking. > >> > > >> > Can you give url to access your lastweek post > ? > >> > > >> > Thank you very much. > >> > > >> > Regards, > >> > > >> > Ferry > >> > > >> > > >> > > >> > > >> > > >> > --- On Sun, 7/11/10, M.Dec-GM > >> > wrote: > >> > > >> > > From: M.Dec-GM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java program > >> > > To: "Ferry Sumendap" , > >> > rxtx at qbang.org > >> > > Date: Sunday, July 11, 2010, 1:33 AM > >> > > Hi, > >> > > Did you read my post? > >> > > > >> > > Look for examples and obtain a list of > available > >> ports > >> > in > >> > > RXTX. > >> > > If your port will be not available on > standard > >> list, > >> > check > >> > > RXTX source, add a line with your ID > and > >> everything > >> > will > >> > > work. > >> > > > >> > > Nobody can do it in your system. > >> > > In my two posts and discussions about > port ID's > >> from > >> > few > >> > > weeks ago you have EVERYTHING to do it > in your > >> system, > >> > so > >> > > more questions will not help more. > >> > > Simply do it. > >> > > > >> > > Regards > >> > > Mariusz > >> > > > >> > > ----- Original Message ----- > >> > > From: "Ferry Sumendap" > >> > > To: ; > >> > > "M.Dec-GMail" > >> > > Sent: Sunday, July 11, 2010 10:16 AM > >> > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > program > >> > > > >> > > > >> > > I use java program X to print 'hello' to > printer > >> > epson > >> > > tm88IV using ISA serial port which is > internally > >> > inside > >> > > motherboard and it works successfully. > >> > > But when come to /dev/ttyD0, java > program X > >> cannot > >> > access > >> > > (even to open the port /dev/ttyD0). > >> > > > >> > > After that, I executed : > >> > >? rm -rf /dev/ttyS1 > >> > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >> > >? rm -rf /dev/ttyS2 > >> > >? ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > in order to make /dev/ttyS1 and > /dev/ttyS2. > >> > > > >> > > But when I want to test using java > program X, > >> the > >> > program > >> > > can access /dev/ttyS1 but it doesn't > print > >> 'hello' but > >> > it > >> > > prints figures I am not expecting it. > >> > > > >> > > > >> > > Any help would be appreciated much. > >> > > Thank you. > >> > > > >> > > Regards, > >> > > Ferry > >> > > > >> > > > >> > > > >> > > --- On Sun, 7/11/10, M.Dec-GMail > >> > > wrote: > >> > > > >> > > > From: M.Dec-GMail > >> > > > Subject: Re: [Rxtx] How to access > >> /dev/ttyD0 > >> > using > >> > > java program > >> > > > To: "Ferry Sumendap" , > >> > > rxtx at qbang.org > >> > > > Date: Sunday, July 11, 2010, 1:01 > AM > >> > > > Hi, > >> > > > what for so complicated actions and > what > >> does it > >> > mean > >> > > "but > >> > > > it is not stable" ???? > >> > > > "Not stable" may means that system > crashes > >> or > >> > that > >> > > port > >> > > > disconnects..... > >> > > > > >> > > > Read carefully examples how to use > RXTX (i.e > >> com > >> > port > >> > > > list). > >> > > > Few weeks ago was discussion about > not > >> visible > >> > USB VCP > >> > > port > >> > > > id and how to solve this very > little > >> problem. > >> > > > Regards > >> > > > Mariusz > >> > > > > >> > > > > >> > > > > >> > > > ----- Original Message ----- > >> > > > From: "Ferry Sumendap" > >> > > > To: > >> > > > Sent: Sunday, July 11, 2010 8:10 > AM > >> > > > Subject: [Rxtx] How to access > /dev/ttyD0 > >> using > >> > java > >> > > > program > >> > > > > >> > > > > >> > > > > Hello guys, I have just bought > external > >> PCI > >> > IO > >> > > (2 > >> > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > >> > > > > I have known and am able to > access > >> > /dev/ttyS0 > >> > > > (ordinary serial port) but this > external PCI > >> IO, > >> > > after > >> > > > installation, it will create > /dev/ttyD0 and > >> > > /dev/ttyD1 > >> > > > instead of /dev/ttyS1 and > /dev/ttyS2. > >> > > > > > >> > > > > I have tried to execute > >> > > > > rm -rf /dev/ttyS1 > >> > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > >> > > > > rm -rf /dev/ttyS2 > >> > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > >> > > > > > >> > > > > and tried to access /dev/ttyS1 > and > >> > /dev/ttyS2 but > >> > > it > >> > > > is not stable on Linux Mandriva > 2009.1 > >> kernel > >> > version > >> > > > 2.6.27. > >> > > > > > >> > > > > Any other solution please ? > >> > > > > Thank you. > >> > > > > > >> > > > > > >> > > > > Regards, > >> > > > > Ferry > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ > >> > > > > Rxtx mailing list > >> > > > > Rxtx at qbang.org > >> > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From pretor_hq at wp.pl Mon Jul 12 07:16:46 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Mon, 12 Jul 2010 15:16:46 +0200 Subject: [Rxtx] windows parallel port and data read In-Reply-To: <4C2E4487.7060005@wp.pl> References: <4C2E4487.7060005@wp.pl> Message-ID: <4C3B15BE.6090506@wp.pl> Hi Does anyone ever wrote such progarm on Windows that read data bits from LPT1 ? I tryied but with no effect. Anyone can help? Kind Regards W dniu 2010-07-02 21:56, pretor_hq at wp.pl pisze: > Hi > > I am trying to write simple program which will read data bits from my > LPT1. > I've searched the list and I didn't found any example. (There is no > such example on wiki either) > > So, does anyone have such code that reads data bits from parallel port > on demand? (i.e. continously with 1 second interval). > > Best regards! > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Mon Jul 12 09:25:53 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 23:25:53 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source In-Reply-To: Message-ID: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Thank you for your detail explanation. Would you like to explain it in simpler way ? The explanation is too technical. Basically, I just want to add /dev/ttyD searching in the library so that my java program can detect and access /dev/ttyD0 serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Scott Howard wrote: > From: Scott Howard > Subject: Re: [Rxtx] Compiling RXTX Source > To: rxtx at qbang.org > Date: Sunday, July 11, 2010, 4:37 PM > UTS_RELEASE is used for building > kernel modules, and there are better > ways of doing it now (when building modules). See: > http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html > > I think rxtx is just using UTS_RELEASE as a check to see if > the kernel > is different than the kernel that it was built against, > then give the > user a runtime warning. > > UTS_RELEASE used to be in linux/version.h and has now been > moved to > linux/utsrelease.h and is only included? in the kernel > headers package > of most distributions (used mostly for making kernel > modules.) The > file name isn't correct in the above email, the name is > now > linux/utsrelease.h. > > This requires pulling in the kernel headers (whose packages > and names > are constantly changing in most distributions and there are > hundreds > of different flavors [1]) to build the package. Since there > are so > many different flavors, it is nearly guaranteed that many > users will > see this warning immediately and there is nothing that can > be done > about it besides build the package themselves (the build > machines will > be different flavors than some users). The Debian > maintainer instead > chose to just disable the checking, sacrificing a warning > for the user > in exchange for not pulling in the linux headers to build > the package. > > Since the package won't build unless the kernel headers are > installed > (and patched something like [2]), maybe removing the > commented out > code from my previous link, or changing the warning to just > being a > message "this code was compiled with kernel: VERSION_NUM" > would be > simple and still get the same point across? Or we can > define > UTS_RELEASE ourselves by replacing "#include > " > with something like "# define UTS_RELEASE name.release" > [3]. That > builds, but I don't know if it replaced UTS_RELEASE with > the string > name.release or the return of name.release. > > > > [1] http://packages.debian.org/sid/linux-headers > > > [2] > Index: rxtx-2.2pre2/src/I2CImp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/I2CImp.c??? > 2010-07-11 17:54:42.114531942 -0400 > +++ rxtx-2.2pre2/src/I2CImp.c??? 2010-07-11 > 18:00:58.039676872 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? include > > +#??? endif > #endif > > extern int errno; > > > similarly for src/RS485Imp.c, src/RawImp.c, > src/SerialImp.c, src/SerialImp.cpp > > > > > [3] > Index: rxtx-2.2pre2/src/RS485Imp.c > =================================================================== > --- rxtx-2.2pre2.orig/src/RS485Imp.c??? > 2010-07-11 18:44:16.279679409 -0400 > +++ rxtx-2.2pre2/src/RS485Imp.c??? > 2010-07-11 19:24:15.939683967 -0400 > @@ -94,6 +94,9 @@ > #??? include /* fix > for linux-2.3.4? kernels */ > #??? include > #??? include > +#??? ifndef UTS_RELEASE > +#??? ??? define UTS_RELEASE > name.release > +#??? endif > #endif > > extern int errno; > > > similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c > > Regards, > Scott > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From showard314 at gmail.com Mon Jul 12 11:59:22 2010 From: showard314 at gmail.com (Scott Howard) Date: Mon, 12 Jul 2010 13:59:22 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <905655.82783.qm@web76807.mail.sg1.yahoo.com> References: <905655.82783.qm@web76807.mail.sg1.yahoo.com> Message-ID: On Mon, Jul 12, 2010 at 11:25 AM, Ferry Sumendap wrote: > Thank you for your detail explanation. > Would you like to explain it in simpler way ? The explanation is too technical. > Basically, I just want to add /dev/ttyD searching in the library so that ?my java program can detect and access /dev/ttyD0 serial port. > > Thank you very much. > > Regards, > Ferry Sorry, my response wasn't to your email but to a different email about the UTS_RELEASE variable in the code. My response doesn't address the /dev/ttyD0 questions you asked in a different thread. Regards, Scott From windisch.gergely at nik.uni-obuda.hu Wed Jul 14 00:12:30 2010 From: windisch.gergely at nik.uni-obuda.hu (Windisch Gergely) Date: Wed, 14 Jul 2010 08:12:30 +0200 (CEST) Subject: [Rxtx] sending 0x00 with rxtx Message-ID: <23651137.26488.1279087950349.JavaMail.root@zimbra> Hi all, I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. I'm trying to send a byte array which contains 0x00 values (among others). The program sends them out, but it does not get to the other side correctly. Here is the array that I'm sending: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 The other end receives: 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 (so basically everything is fine until the first 0x00, and then crap comes afterwards) If I change my input (ie. change the 0x00 to something else) to 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 then on the other side I get 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. My environment: I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. The code is as simple as it gets: outputStream.write(bData); outputStream.flush(); bData holds the correct values formatted correctly when it is passed on to the write method. I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) Thanks in advance! Gergely From george.dma at gmail.com Wed Jul 14 00:26:52 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 09:26:52 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <23651137.26488.1279087950349.JavaMail.root@zimbra> References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: On Wed, Jul 14, 2010 at 9:12 AM, Windisch Gergely wrote: > Hi all, > > I'm new on the list, and I'm quite desperate. I've spent the best part of today googling the archives, bug reports and generally the web, but haven't been able to come up with a solution to my problem. > > I'm trying to send a byte array which contains 0x00 values (among others). > > The program sends them out, but it does not get to the other side correctly. > > Here is the array that I'm sending: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > The other end receives: > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x00 0x22 0x26 0xDD 0x11 0x50 0x02 0x44 > > (so basically everything is fine until the first 0x00, and then crap comes afterwards) > > If I change my input (ie. change the 0x00 to something else) to > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x28 0x18 > > then on the other side I get > > 0x02 0x09 0x03 0x16 0x79 0x76 0x04 0x03 0x51 0x80 0x0c 0x01 0x00 0x02 0x44 > > So again, everything is fine until the first 0x00, and the same garbage comes (I guess it gets the corrupt data from the same memory location) > > Without knowing anything about the rxtx source code, I would say that the write function (maybe implemented in c?) treats the 0x00 as a string terminating character (the interesting part is that it sends the same amount of bytes as the input, but it stops reading the actual input as soon as it sees the first null - the rest of the bytes seem to me like uninitialized memory bytes) > > If I get rid of the 0x00 values everything works perfectly. I get exactly what I send. > > My environment: > I'm using Ubuntu linux. I've tried the stable version of RXTX (2.1.7), and just to make sure, the precompiled binaries of the 2.2pre2. > > I'm connected to a second machine also running ubuntu, and I'm using gtkterm's hexa viewer to see what comes through. > > The code is as simple as it gets: > > ?outputStream.write(bData); > ?outputStream.flush(); > > bData holds the correct values formatted correctly when it is passed on to the write method. > > I've tried playing around with all the parameters (flow control, baud rate, parity, data bits etc.) - nothing seems to help. > > Is this a known issue? Is there a workaround? (I know, I should try and avoid sending zeros, but that is not entirely feasible :) > > Thanks in advance! > > Gergely > Hi, that's an interesting problem. I want to know if you tried sending the data 1 byte at a time without using the write(byte[]) that takes in a whole array. Something else to test, just for the sake of testing. Does this problem happen with all devices? or just this one ? I am just trying to rule out the possibility that maybe something else is (aside from rxtx) could be messing things up when it sees a 0x00. You could try connecting rxtx to some dummy device and monitor the bytes arriving to it and see if you get the same results. Good luck. From msemtd at googlemail.com Wed Jul 14 00:45:39 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 14 Jul 2010 07:45:39 +0100 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <23651137.26488.1279087950349.JavaMail.root@zimbra> Message-ID: Are both ends using rxtx? How are you populating your byte array? Post us your code and we'll see what's going on. Regards, Michael Erskine. From george.dma at gmail.com Wed Jul 14 03:14:07 2010 From: george.dma at gmail.com (George H) Date: Wed, 14 Jul 2010 12:14:07 +0300 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: <9451472.27317.1279098176079.JavaMail.root@zimbra> References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: 2010/7/14 Windisch Gergely : > Hi George, > >> You could try >> connecting rxtx to some dummy device and monitor the bytes arriving to >> it and see if you get the same results. > > Actually, this is what I have been doing all along, because the receiving end of the software is not ready just yet - so I'm writing my code and testing it with gtkterm on a different machine (gtkterm is a linux terminal software that writes the raw data as it gets in from the serial port). > > But since you have mentioned this, I gave another terminal a try, and to my surprise, the problem went away. > > When I monitor the data I receive with realterm in windows or hyperterminal, I see the correct data. So the problem actually is with gtkterm. I've been using it for a long time without any problems, never would have thought it would behave so weird. > > So, to sum up: problem solved. > > Thanks for your help (and Michel, thank you as well) > > Gergely > Glad you solved your problem quickly. From mariusz.dec at gmail.com Wed Jul 14 05:03:25 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Wed, 14 Jul 2010 13:03:25 +0200 Subject: [Rxtx] sending 0x00 with rxtx References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Wed Jul 14 05:53:31 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 14 Jul 2010 07:53:31 -0400 Subject: [Rxtx] sending 0x00 with rxtx In-Reply-To: References: <9451472.27317.1279098176079.JavaMail.root@zimbra> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D04AFC4EF@MTL-MSG-02.cgiclients.com> I was having issues like this about a year ago where the code would work great in SUSE or Ubuntu or Windows, but once I started trying to send from a virtualbox VM I was getting error's like the 0x00 corrupt issue In my case I was driving a printer. I chalked it up to a bug in virtualbox's virtual port code. Maybe there is something else going on. One day the issue went away and I haven't seen it since. Cheers, Tristan -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of M.Dec-GMail Sent: Wednesday, July 14, 2010 8:03 AM To: George H; rxtx Subject: Re: [Rxtx] sending 0x00 with rxtx Hi all, problem solved and were on the other side than RXTX... Because of this - couple of my experiences with lost specific data... On the Windows side I am using few different Serial packages for Delphi. There are some possible configurations, which defines easy service for some transmitted values. In the file of the "specific values" may be software handshake XOn/Xoff data and/or null (0x00) byte or whatever (as byte value). Author of the terminal program (like hypertherm) may receive XON/XOff/0x00/.... , react on their values and TRANSFER it to user OR NOT. >From outside it looks that terminal looses "specific data", or sender does nothing, but in fact there were transmitted from sender and interpreted as control bytes on the recieiver side... !!!!!! So configuration of the "alien" terminal program may be very important when we don't know how terminal software was written. !!!!!! Because of the unknown reactions of the "alien" terminal software, I am preparing MY OWN terminal for each project. Simple data parser, specific for particular project helps a lot as well :). And this is my recommendation - own written terminal - while you are preparing communcation solutions you may be sure that at least one side works good :). Regards Mariusz >> >> So, to sum up: problem solved. >> >> Thanks for your help (and Michel, thank you as well) >> >> Gergely >> > > Glad you solved your problem quickly. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From ron at ronsgallery.com Thu Jul 15 11:00:09 2010 From: ron at ronsgallery.com (Ron Olson (home)) Date: Thu, 15 Jul 2010 13:00:09 -0400 Subject: [Rxtx] Clearing all pending input bytes Message-ID: <4C3F3E99.7080509@ronsgallery.com> I need my serial comm handler (which uses rxtx 2.1-7r2 under Linux) to clear pending input bytes. By pending input bytes, I mean all bytes that have arrived off the wire. My interest in this is that for my application, there are points in the handler where clearing these bytes would simplify the software and save CPU cycles. I'm currently doing the following, which successfully clears front-end bytes, but not necessarily the last bytes in. - Get the count of available bytes by calling InputStream.available(). - Clear those bytes by calling InputStream.read() for that byte count. I expect the problem is that there are bytes in the pipeline, perhaps way back in the UART FIFO, that aren't far enough along in the pipe to be reflected by the available() method. That wouldn't be surprising since bytes aren't really available until they work their way past the UART through the kernel into the rxtx world. So - can anyone provide an approach to accomplish this clear-input function? My fear is that doing this from on top of rxtx, or even directly on top of the kernel, is impossible. If you can at least confirm or correct my thinking on all this, that would also help. Thanks Ron From Aaron.Baff at telescope.tv Fri Jul 23 12:15:16 2010 From: Aaron.Baff at telescope.tv (Aaron Baff) Date: Fri, 23 Jul 2010 11:15:16 -0700 Subject: [Rxtx] Disable startup output Message-ID: Is there any way to disable the startup output from RXTXCommDriver.java that outputs to System.out? I'm trying to develop a program that returns output to a calling script on stdout, but the output from the startup check will interfere with that. From the comment, it's a good idea, but maybe you could only output if there was a problem (e.g. mis-match) instead of even when things are fine? I'll see if the output can be worked around so I don't have to manually compile my own version without that in it. Aaron Baff | Developer | Telescope, Inc. email: aaron.baff at telescope.tv | office: 424 270 2913 | www.telescope.tv Have you ever wanted to go on a frivolous shopping spree, or a trip around the world? Make your dream life come true by calling 1-888-82PRICE to be entered into a sweepstakes for a chance to win $50,000 and a weekly prize. For more information check out our website at http://www.telescope.tv/clients.html No purchase necessary, see rules and at www.playontv.tv . The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this message are those of the individual and may not necessarily reflect the views of Telescope Inc. or its associated companies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 23 13:30:27 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 23 Jul 2010 20:30:27 +0100 Subject: [Rxtx] Disable startup output In-Reply-To: References: Message-ID: On 23 July 2010 19:15, Aaron Baff wrote: > Is there any way to disable the startup output from RXTXCommDriver.java that > outputs to System.out? I?m trying to develop a program that returns output > to a calling script on stdout, but the output from the startup check will > interfere with that. From the comment, it?s a good idea, but maybe you could > only output if there was a problem (e.g. mis-match) instead of even when > things are fine? I?ll see if the output can be worked around so I don?t have > to manually compile my own version without that in it. Hi Aaron, You could redirect System.out temporarily (or even permanently!) Regards, Michael Erskine. From n.zrelli at tu-bs.de Thu Jul 29 18:41:11 2010 From: n.zrelli at tu-bs.de (Nejd Zrelli) Date: Fri, 30 Jul 2010 02:41:11 +0200 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) Message-ID: <4C521FA7.1080803@tu-bs.de> Hi all, I'm using the RxTxcomm library in a project about train recognition system. I communicate with the virtual serial port to send commands to the hardware. To avoid polling the serial port i used the event based alternative to trigger the reading. For any command i send, i get a response. To increase the responses frequency's without overrunning the buffer i tried to trigger the writing to the serial port within the serial event. The strange thing i get is that the serialEvent() will be partially executed!! some instructions will be simply ignored! i don't know why.. - is there a solution or a workaround to avoid this problem ? Thanks in advance! Zrelli From invite+zrdoi=fgeerf at facebookmail.com Fri Jul 30 11:59:46 2010 From: invite+zrdoi=fgeerf at facebookmail.com (Arnab Bhaumik) Date: Fri, 30 Jul 2010 10:59:46 -0700 Subject: [Rxtx] Check out my photos on Facebook Message-ID: I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Arnab To sign up for Facebook, follow the link below: http://www.facebook.com/p.php?i=100001436287276&k=Z6E3Y6SXS3V14EBJPB63QUUPRTAD34ZNUWHQFBW1RU&r Already have an account? Add this email address to your account: http://www.facebook.com/n/?merge_accounts.php&e=rxtx%40qbang.org&c=26d707a30a6962147b5354a8abe0a7fe ======================================= rxtx at qbang.org was invited to join Facebook by Arnab Bhaumik. If you do not wish to receive this type of email from Facebook in the future, please click on the link below to unsubscribe. http://www.facebook.com/o.php?k=3ecb54&u=100001431127305&mid=2bd1040G5af365c78509G0G8 Facebook, Inc. P.O. Box 10005, Palo Alto, CA 94303 -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Jul 30 12:32:53 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 30 Jul 2010 19:32:53 +0100 Subject: [Rxtx] lifetime of the serialEvent(SerialPortEvent args0) In-Reply-To: <4C521FA7.1080803@tu-bs.de> References: <4C521FA7.1080803@tu-bs.de> Message-ID: On 30 July 2010 01:41, Nejd Zrelli wrote: > The strange thing i > get is that the serialEvent() will be partially executed!! ?some > instructions will be simply ignored! i don't know why.. Hi Zrelli, Do you mean that the serialEvent is triggered prior to a complete message being received? That is entirely probable and you should structure your data received handler to cope with that. Every protocol handler I write takes the form of a state machine: bytes come in and messages come out -- this is a general purpose pattern for all structured communications, be it serial, TCP/IP, or what have you. BTW: if you protocol required data sends at regular periods then use a separate thread rather than abusing the event handler thread. Use timeouts appropriate to the devices that are communicating. Regards, Michael Erskine. From msemtd at googlemail.com Thu Jul 1 03:47:17 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Thu, 1 Jul 2010 10:47:17 +0100 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> Message-ID: On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine From mariusz.dec at gmail.com Fri Jul 2 00:56:40 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 08:56:40 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: 2010/7/1 Preetinder Rooprai > My Problem is: > 1)I want to use this voltage at usb to lit an LED > You have to use output control lines (like RTS) controlled manually, - no "write to com". > 2)Give timing to the LED > > > Use Normal java Timers Regards Mariusz > Or just let me know that whist port of computer in windows xp and which > device should I use to check the output of the above program at usb. > Device should have easiest circuit. > And which corresponding string that I should send from program to usb to > make your cricuit work. > Thank You > Preetinder Rooprai > India > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jul 2 02:51:39 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 2 Jul 2010 10:51:39 +0200 Subject: [Rxtx] New at RXTX In-Reply-To: References: Message-ID: Sorry, this mailing list isn't place for solving school works. This may be a place to show direction of self discoverings for students. I think that you know google and wiki - there are tons of answers. Using my hints you have everything to solve your problem. Other way is to order solution, but this isn't for free. Do something, show that you are trying solve problem - in this case a lot of peoples will help you.. Regards Mariusz 2010/7/2 Preetinder Rooprai > Please explain in detail! > > On 7/1/10, Mariusz Dec wrote: >> >> >> >> 2010/7/1 Preetinder Rooprai >> >>> My Problem is: >>> 1)I want to use this voltage at usb to lit an LED >>> >> >> You have to use output control lines (like RTS) controlled manually, - no >> "write to com". >> >> >>> 2)Give timing to the LED >>> >>> >>> Use Normal java Timers >> >> Regards >> Mariusz >> >>> Or just let me know that whist port of computer in windows xp and which >>> device should I use to check the output of the above program at usb. >>> Device should have easiest circuit. >>> And which corresponding string that I should send from program to usb to >>> make your cricuit work. >>> Thank You >>> Preetinder Rooprai >>> India >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pretor_hq at wp.pl Fri Jul 2 13:56:55 2010 From: pretor_hq at wp.pl (pretor_hq at wp.pl) Date: Fri, 02 Jul 2010 21:56:55 +0200 Subject: [Rxtx] windows parallel port and data read Message-ID: <4C2E4487.7060005@wp.pl> Hi I am trying to write simple program which will read data bits from my LPT1. I've searched the list and I didn't found any example. (There is no such example on wiki either) So, does anyone have such code that reads data bits from parallel port on demand? (i.e. continously with 1 second interval). Best regards! From kalohr at gmail.com Mon Jul 5 09:21:27 2010 From: kalohr at gmail.com (kalohr) Date: Mon, 5 Jul 2010 18:21:27 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 Message-ID: hello, I am trying to control a vending machine through parallel port communication this is my code: public static void main(String[] args) { try{ CoinParallelPortManager coinMng = new CoinParallelPortManager(); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portIdTmp = (CommPortIdentifier) portList.nextElement(); System.out.println("Found port: "+portId.getName()); if (portIdTmp.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Found port: "+portIdTmp.getName()); portId=portIdTmp; if (portId.getName().equals(portName)) { System.out.println("Found port: "); } } } parallelPort = (ParallelPort)(portId.open("test", 50)); parallelPort.addEventListener(coinMng); InputStream inputStream = parallelPort.getInputStream(); while(true){ int str = (int)inputStream.read(); logger.info("READ "+str); } }catch(Exception e){ logger.info(e.toString()); e.printStackTrace(); } } I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 I have enabled the parport_pc and ppdev kernel modules with modprob and disabled the lp module, after reading various posts have also changed the permissions to /dev/parport0 to 666 still, I do not get a non-null portIdentifier any ideas? From kalohr at gmail.com Tue Jul 6 00:12:35 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 09:12:35 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: has anyone ever worked with the parallel port in ubuntu/debian? could the problem relate to the distro? On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > hello, I am trying to control a vending machine through parallel port > communication > > this is my code: > > ? ?public static void main(String[] args) { > ? ? ? ? ? ? ? ?try{ > ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new > CoinParallelPortManager(); > > ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > > ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) > portList.nextElement(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: > "+portId.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == > CommPortIdentifier.PORT_PARALLEL) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found > port: "+portIdTmp.getName()); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { > > System.out.println("Found port: "); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); > ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); > > ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); > ? ? ? ? ? ? ? ? ? ? ? ?while(true){ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?}catch(Exception e){ > ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); > ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); > ? ? ? ? ? ? ? ?} > ? ? ? ?} > > I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > > I have enabled the parport_pc and ppdev kernel modules with modprob > and disabled the lp module, after reading various posts > > have also changed the permissions to /dev/parport0 to 666 > > still, I do not get a non-null portIdentifier > > any ideas? > From kalohr at gmail.com Tue Jul 6 11:03:11 2010 From: kalohr at gmail.com (kalohr) Date: Tue, 6 Jul 2010 20:03:11 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: it seems that my parallel port, /dev/parport0, is invisible I have tried serial communication successfully, but I need to go parallel rxtx is installed correctly since I can use the serial port my javax.comm.properties file contains the following lines driver=com.sun.comm.LinuxDriver # Paths to server-side serial port devices serpath0 = /dev/ttyS0 serpath1 = /dev/ttyS1 # Paths to server-side parallel port devices parpath0 = /dev/parport0 parpath1 = /dev/parport1 On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > has anyone ever worked with the parallel port in ubuntu/debian? > > could the problem relate to the distro? > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >> hello, I am trying to control a vending machine through parallel port >> communication >> >> this is my code: >> >> ? ?public static void main(String[] args) { >> ? ? ? ? ? ? ? ?try{ >> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >> CoinParallelPortManager(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >> CommPortIdentifier.getPortIdentifiers(); >> >> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >> portList.nextElement(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >> "+portId.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >> CommPortIdentifier.PORT_PARALLEL) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >> port: "+portIdTmp.getName()); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >> >> System.out.println("Found port: "); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >> >> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?}catch(Exception e){ >> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >> >> I have enabled the parport_pc and ppdev kernel modules with modprob >> and disabled the lp module, after reading various posts >> >> have also changed the permissions to /dev/parport0 to 666 >> >> still, I do not get a non-null portIdentifier >> >> any ideas? >> > From palen1c at gmail.com Tue Jul 6 21:07:26 2010 From: palen1c at gmail.com (Charles Palen) Date: Tue, 6 Jul 2010 23:07:26 -0400 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: Sorry I couldn't help you out kalohr. I'm out of ideas because I have never worked with RXTX using the parallel port. On Tue, Jul 6, 2010 at 1:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: > > has anyone ever worked with the parallel port in ubuntu/debian? > > > > could the problem relate to the distro? > > > > On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: > >> hello, I am trying to control a vending machine through parallel port > >> communication > >> > >> this is my code: > >> > >> public static void main(String[] args) { > >> try{ > >> CoinParallelPortManager coinMng = new > >> CoinParallelPortManager(); > >> > >> Enumeration portList = > >> CommPortIdentifier.getPortIdentifiers(); > >> > >> while (portList.hasMoreElements()) { > >> portIdTmp = (CommPortIdentifier) > >> portList.nextElement(); > >> System.out.println("Found port: > >> "+portId.getName()); > >> if (portIdTmp.getPortType() == > >> CommPortIdentifier.PORT_PARALLEL) { > >> System.out.println("Found > >> port: "+portIdTmp.getName()); > >> portId=portIdTmp; > >> if > (portId.getName().equals(portName)) { > >> > >> System.out.println("Found port: "); > >> } > >> } > >> } > >> > >> parallelPort = (ParallelPort)(portId.open("test", > 50)); > >> parallelPort.addEventListener(coinMng); > >> > >> InputStream inputStream = > parallelPort.getInputStream(); > >> while(true){ > >> int str = (int)inputStream.read(); > >> logger.info("READ "+str); > >> } > >> }catch(Exception e){ > >> logger.info(e.toString()); > >> e.printStackTrace(); > >> } > >> } > >> > >> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 > >> > >> I have enabled the parport_pc and ppdev kernel modules with modprob > >> and disabled the lp module, after reading various posts > >> > >> have also changed the permissions to /dev/parport0 to 666 > >> > >> still, I do not get a non-null portIdentifier > >> > >> any ideas? > >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Charles Palen -------------- next part -------------- An HTML attachment was scrubbed... URL: From joels at Navsys.com Wed Jul 7 07:32:05 2010 From: joels at Navsys.com (Joel Schuster) Date: Wed, 7 Jul 2010 07:32:05 -0600 Subject: [Rxtx] wrapping rxtx in eclipse In-Reply-To: References: <201006301117.26265.karl.weber99@gmx.net> , Message-ID: <22C014AD6A8EBE4EA681FC0D275E4F150330463513@Dualla.NAVSYS.COM> I have rxtx wrapped in a OSGi bundle, works great! I'm not at work today, but I'll send out the bundle tomorrow when I get in. I used a tool that's part of the Felix OSGi implementation called bndwrap which is part of the bnd toolset. OSGi handles native library loading quite nicely, and as a bundle is a bundle is a bundle, no matter the implementation it should work in eclipse just fine. - Joel ________________________________________ From: rxtx-bounces at qbang.org [rxtx-bounces at qbang.org] On Behalf Of Michael Erskine [msemtd at googlemail.com] Sent: Thursday, July 01, 2010 3:47 AM To: rxtx at qbang.org Subject: Re: [Rxtx] wrapping rxtx in eclipse On 30 June 2010 11:07, andrea antonello wrote: > Hi Karl, > I think your suggestions are good. > > The problem is that I am also no Osgi specialist. > > I can ensure a continuity in maintainment and bugfixes only by > proposing something I would do anyways, which is keeping up the > plugins and fragments for my project. > For something something different I am afraid that after few time it > would get of low priority in my list of job tasks and I prefer to not > take that path. > > Andrea All, As luck would have it, I've just started playing with OSGI platform and I should get some time to have a go at this. Caveat: it may suck in the early development stages :) Regards, Michael Erskine _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From kalohr at gmail.com Fri Jul 9 11:36:17 2010 From: kalohr at gmail.com (kalohr) Date: Fri, 9 Jul 2010 20:36:17 +0300 Subject: [Rxtx] rxtx null portId at Ubuntu 8.04 In-Reply-To: References: Message-ID: after downloading and compiling the source on a new installation of ubuntu 8.04.4 it finally worked it seemed that the librxtx*.so's that I've downloaded could not work for my system. Only natural, since I had not checked the available releases. Tomboy should have worked anyway, the only problem I faced is that I needed to add add in /usr/include/linux/version.h the definition #define UTS_RELEASE "2.6.24-26-generic" in order for the configuration script to work other than that, the compilation and installation was straightforward thank you all for the help Kalohr On Tue, Jul 6, 2010 at 8:03 PM, kalohr wrote: > it seems that my parallel port, /dev/parport0, is invisible > > I have tried serial communication successfully, but I need to go parallel > > rxtx is installed correctly since I can use the serial port > > my javax.comm.properties file contains the following lines > > driver=com.sun.comm.LinuxDriver > # Paths to server-side serial port devices > serpath0 = /dev/ttyS0 > serpath1 = /dev/ttyS1 > # Paths to server-side parallel port devices > parpath0 = /dev/parport0 > parpath1 = /dev/parport1 > > On Tue, Jul 6, 2010 at 9:12 AM, kalohr wrote: >> has anyone ever worked with the parallel port in ubuntu/debian? >> >> could the problem relate to the distro? >> >> On Mon, Jul 5, 2010 at 6:21 PM, kalohr wrote: >>> hello, I am trying to control a vending machine through parallel port >>> communication >>> >>> this is my code: >>> >>> ? ?public static void main(String[] args) { >>> ? ? ? ? ? ? ? ?try{ >>> ? ? ? ? ? ? ? ? ? ? ? ?CoinParallelPortManager coinMng = new >>> CoinParallelPortManager(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?Enumeration portList = >>> CommPortIdentifier.getPortIdentifiers(); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?while (portList.hasMoreElements()) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portIdTmp = (CommPortIdentifier) >>> portList.nextElement(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found port: >>> "+portId.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portIdTmp.getPortType() == >>> CommPortIdentifier.PORT_PARALLEL) { >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?System.out.println("Found >>> port: "+portIdTmp.getName()); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?portId=portIdTmp; >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (portId.getName().equals(portName)) { >>> >>> System.out.println("Found port: "); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort = (ParallelPort)(portId.open("test", 50)); >>> ? ? ? ? ? ? ? ? ? ? ? ?parallelPort.addEventListener(coinMng); >>> >>> ? ? ? ? ? ? ? ? ? ? ? ?InputStream inputStream = parallelPort.getInputStream(); >>> ? ? ? ? ? ? ? ? ? ? ? ?while(true){ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int str = (int)inputStream.read(); >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?logger.info("READ "+str); >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?}catch(Exception e){ >>> ? ? ? ? ? ? ? ? ? ? ? ?logger.info(e.toString()); >>> ? ? ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); >>> ? ? ? ? ? ? ? ?} >>> ? ? ? ?} >>> >>> I am using Ubutu 8.04 LTS, kernel version 2.6.24-26 >>> >>> I have enabled the parport_pc and ppdev kernel modules with modprob >>> and disabled the lp module, after reading various posts >>> >>> have also changed the permissions to /dev/parport0 to 666 >>> >>> still, I do not get a non-null portIdentifier >>> >>> any ideas? >>> >> > From ferry_new2004 at yahoo.com Sun Jul 11 00:10:07 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 14:10:07 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. I have tried to execute rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. Any other solution please ? Thank you. Regards, Ferry From mariusz.dec at gmail.com Sun Jul 11 02:01:30 2010 From: mariusz.dec at gmail.com (M.Dec-GMail) Date: Sun, 11 Jul 2010 10:01:30 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <327337.6441.qm@web76805.mail.sg1.yahoo.com> Message-ID: Hi, what for so complicated actions and what does it mean "but it is not stable" ???? "Not stable" may means that system crashes or that port disconnects..... Read carefully examples how to use RXTX (i.e com port list). Few weeks ago was discussion about not visible USB VCP port id and how to solve this very little problem. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: Sent: Sunday, July 11, 2010 8:10 AM Subject: [Rxtx] How to access /dev/ttyD0 using java program > Hello guys, I have just bought external PCI IO (2 serial + 1 pararel) Moschip MCS9865IV-AA. > I have known and am able to access /dev/ttyS0 (ordinary serial port) but this external PCI IO, after installation, it will create /dev/ttyD0 and /dev/ttyD1 instead of /dev/ttyS1 and /dev/ttyS2. > > I have tried to execute > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it is not stable on Linux Mandriva 2009.1 kernel version 2.6.27. > > Any other solution please ? > Thank you. > > > Regards, > Ferry > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Sun Jul 11 02:16:09 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:16:09 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <346823.46258.qm@web76813.mail.sg1.yahoo.com> I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf? /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf? /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > >? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From mariusz.dec at gmail.com Sun Jul 11 02:33:37 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 10:33:37 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <346823.46258.qm@web76813.mail.sg1.yahoo.com> Message-ID: <60DFC92798EF4581B35777344BA380BD@mdam2> Hi, Did you read my post? Look for examples and obtain a list of available ports in RXTX. If your port will be not available on standard list, check RXTX source, add a line with your ID and everything will work. Nobody can do it in your system. In my two posts and discussions about port ID's from few weeks ago you have EVERYTHING to do it in your system, so more questions will not help more. Simply do it. Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GMail" Sent: Sunday, July 11, 2010 10:16 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I use java program X to print 'hello' to printer epson tm88IV using ISA serial port which is internally inside motherboard and it works successfully. But when come to /dev/ttyD0, java program X cannot access (even to open the port /dev/ttyD0). After that, I executed : rm -rf /dev/ttyS1 ln -sf /dev/ttyD0 /dev/ttyS1 rm -rf /dev/ttyS2 ln -sf /dev/ttyD1 /dev/ttyS2 in order to make /dev/ttyS1 and /dev/ttyS2. But when I want to test using java program X, the program can access /dev/ttyS1 but it doesn't print 'hello' but it prints figures I am not expecting it. Any help would be appreciated much. Thank you. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GMail wrote: > From: M.Dec-GMail > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:01 AM > Hi, > what for so complicated actions and what does it mean "but > it is not stable" ???? > "Not stable" may means that system crashes or that port > disconnects..... > > Read carefully examples how to use RXTX (i.e com port > list). > Few weeks ago was discussion about not visible USB VCP port > id and how to solve this very little problem. > Regards > Mariusz > > > > ----- Original Message ----- > From: "Ferry Sumendap" > To: > Sent: Sunday, July 11, 2010 8:10 AM > Subject: [Rxtx] How to access /dev/ttyD0 using java > program > > > > Hello guys, I have just bought external PCI IO (2 > serial + 1 pararel) Moschip MCS9865IV-AA. > > I have known and am able to access /dev/ttyS0 > (ordinary serial port) but this external PCI IO, after > installation, it will create /dev/ttyD0 and /dev/ttyD1 > instead of /dev/ttyS1 and /dev/ttyS2. > > > > I have tried to execute > > rm -rf /dev/ttyS1 > > ln -sf /dev/ttyD0 /dev/ttyS1 > > rm -rf /dev/ttyS2 > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but it > is not stable on Linux Mandriva 2009.1 kernel version > 2.6.27. > > > > Any other solution please ? > > Thank you. > > > > > > Regards, > > Ferry > > > > > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > From ferry_new2004 at yahoo.com Sun Jul 11 02:48:28 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 16:48:28 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <60DFC92798EF4581B35777344BA380BD@mdam2> Message-ID: <24002.37206.qm@web76811.mail.sg1.yahoo.com> I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf? /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf? /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From mariusz.dec at gmail.com Sun Jul 11 03:10:57 2010 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Sun, 11 Jul 2010 11:10:57 +0200 Subject: [Rxtx] How to access /dev/ttyD0 using java program References: <24002.37206.qm@web76811.mail.sg1.yahoo.com> Message-ID: This thread http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html Regards Mariusz ----- Original Message ----- From: "Ferry Sumendap" To: ; "M.Dec-GM" Sent: Sunday, July 11, 2010 10:48 AM Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program I am sorry sir... What I mean with java program X is actually the sample program how to access serial port using rxtx. Java program X is not a complicated system.. I use the term X in order to simplify the language of speaking. Can you give url to access your lastweek post ? Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 1:33 AM > Hi, > Did you read my post? > > Look for examples and obtain a list of available ports in > RXTX. > If your port will be not available on standard list, check > RXTX source, add a line with your ID and everything will > work. > > Nobody can do it in your system. > In my two posts and discussions about port ID's from few > weeks ago you have EVERYTHING to do it in your system, so > more questions will not help more. > Simply do it. > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GMail" > Sent: Sunday, July 11, 2010 10:16 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I use java program X to print 'hello' to printer epson > tm88IV using ISA serial port which is internally inside > motherboard and it works successfully. > But when come to /dev/ttyD0, java program X cannot access > (even to open the port /dev/ttyD0). > > After that, I executed : > rm -rf /dev/ttyS1 > ln -sf /dev/ttyD0 /dev/ttyS1 > rm -rf /dev/ttyS2 > ln -sf /dev/ttyD1 /dev/ttyS2 > in order to make /dev/ttyS1 and /dev/ttyS2. > > But when I want to test using java program X, the program > can access /dev/ttyS1 but it doesn't print 'hello' but it > prints figures I am not expecting it. > > > Any help would be appreciated much. > Thank you. > > Regards, > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GMail > wrote: > > > From: M.Dec-GMail > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:01 AM > > Hi, > > what for so complicated actions and what does it mean > "but > > it is not stable" ???? > > "Not stable" may means that system crashes or that > port > > disconnects..... > > > > Read carefully examples how to use RXTX (i.e com port > > list). > > Few weeks ago was discussion about not visible USB VCP > port > > id and how to solve this very little problem. > > Regards > > Mariusz > > > > > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: > > Sent: Sunday, July 11, 2010 8:10 AM > > Subject: [Rxtx] How to access /dev/ttyD0 using java > > program > > > > > > > Hello guys, I have just bought external PCI IO > (2 > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > I have known and am able to access /dev/ttyS0 > > (ordinary serial port) but this external PCI IO, > after > > installation, it will create /dev/ttyD0 and > /dev/ttyD1 > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > I have tried to execute > > > rm -rf /dev/ttyS1 > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > rm -rf /dev/ttyS2 > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > and tried to access /dev/ttyS1 and /dev/ttyS2 but > it > > is not stable on Linux Mandriva 2009.1 kernel version > > 2.6.27. > > > > > > Any other solution please ? > > > Thank you. > > > > > > > > > Regards, > > > Ferry > > > > > > > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > From ferry_new2004 at yahoo.com Sun Jul 11 04:07:03 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:03 +0800 (SGT) Subject: [Rxtx] Compiling RXTX Source Message-ID: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Hello guys, Based on INSTALL file : The following packages are used to build rxtx: autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 jdk 1.3 or newer With the packages installed, proceed to build and install rxtx. $ tar -xzvf rxtx-2.1.tar.gz $ cd rxtx-2.1 $ ./configure (follow the instructions) $ make install (gmake if your system uses that convention) Read "R. How can I use Lock Files with rxtx?" I am trying to compile RXTX Source by executing ./configure first. But I got this result : ... checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /usr/java/jdk1.6.0_02 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jdk1.6.0_02 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_02 checking os.version 2.6.29.1-desktop-4mnb conftest.c: In function 'main': conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) conftest.c:8: error: (Each undeclared identifier is reported only once conftest.c:8: error: for each function it appears in.) conftest.c:8: error: expected ')' before string constant ./configure: line 21462: ./conftest: No such file or directory ./configure: line 21462: test: 2.6.29.1-desktop-4mnb: unary operator expected configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands When I execute : make install I got this error : gcc -I/projects/rxtx-2.1-7r2 -Ii686-pc-linux-gnu -I. -I/usr/java/jdk1.6.0_02/include -I/usr/java/jdk1.6.0_02/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /projects/rxtx-2.1-7r2/./src/RS485Imp.c -fPIC -DPIC -o /projects/rxtx-2.1-7r2/i686-pc-linux-gnu/.libs/RS485Imp.o /projects/rxtx-2.1-7r2/./src/RS485Imp.c: In function ?Java_gnu_io_RS485Port_Initialize?: /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: ?UTS_RELEASE? undeclared (first use in this function) /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: (Each undeclared identifier is reported only once /projects/rxtx-2.1-7r2/./src/RS485Imp.c:96: error: for each function it appears in.) rm -fr .libs/librxtxRS485-2.1-7.so .libs/librxtxRS485.la .libs/librxtxRS485.lai .libs/librxtxRS485.so gcc -shared -lpthread -Wl,-soname -Wl,librxtxRS485-2.1-7.so -o .libs/librxtxRS485-2.1-7.so (cd .libs && rm -f librxtxRS485.so && ln -s librxtxRS485-2.1-7.so librxtxRS485.so) creating librxtxRS485.la (cd .libs && rm -f librxtxRS485.la && ln -s ../librxtxRS485.la librxtxRS485.la) make all-am make[1]: Entering directory `/projects/rxtx-2.1-7r2' make[1]: Leaving directory `/projects/rxtx-2.1-7r2' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 What does those log mean ? Thank you. Regards, Ferry From ferry_new2004 at yahoo.com Sun Jul 11 04:07:47 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Sun, 11 Jul 2010 18:07:47 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: Message-ID: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Thank you very much Mariusz.. Now I understand what the problem is. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, M.Dec-GM wrote: > From: M.Dec-GM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: "Ferry Sumendap" , rxtx at qbang.org > Date: Sunday, July 11, 2010, 2:10 AM > This thread > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > Regards > Mariusz > > ----- Original Message ----- > From: "Ferry Sumendap" > To: ; > "M.Dec-GM" > Sent: Sunday, July 11, 2010 10:48 AM > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java > program > > > I am sorry sir... > What I mean with java program X is actually the sample > program how to access serial port using rxtx. Java program X > is not a complicated system.. I use the term X in order to > simplify the language of speaking. > > Can you give url to access your lastweek post ? > > Thank you very much. > > Regards, > > Ferry > > > > > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 1:33 AM > > Hi, > > Did you read my post? > > > > Look for examples and obtain a list of available ports > in > > RXTX. > > If your port will be not available on standard list, > check > > RXTX source, add a line with your ID and everything > will > > work. > > > > Nobody can do it in your system. > > In my two posts and discussions about port ID's from > few > > weeks ago you have EVERYTHING to do it in your system, > so > > more questions will not help more. > > Simply do it. > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GMail" > > Sent: Sunday, July 11, 2010 10:16 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I use java program X to print 'hello' to printer > epson > > tm88IV using ISA serial port which is internally > inside > > motherboard and it works successfully. > > But when come to /dev/ttyD0, java program X cannot > access > > (even to open the port /dev/ttyD0). > > > > After that, I executed : > >? rm -rf /dev/ttyS1 > >? ln -sf /dev/ttyD0 /dev/ttyS1 > >? rm -rf /dev/ttyS2 > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > But when I want to test using java program X, the > program > > can access /dev/ttyS1 but it doesn't print 'hello' but > it > > prints figures I am not expecting it. > > > > > > Any help would be appreciated much. > > Thank you. > > > > Regards, > > Ferry > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > wrote: > > > > > From: M.Dec-GMail > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:01 AM > > > Hi, > > > what for so complicated actions and what does it > mean > > "but > > > it is not stable" ???? > > > "Not stable" may means that system crashes or > that > > port > > > disconnects..... > > > > > > Read carefully examples how to use RXTX (i.e com > port > > > list). > > > Few weeks ago was discussion about not visible > USB VCP > > port > > > id and how to solve this very little problem. > > > Regards > > > Mariusz > > > > > > > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: > > > Sent: Sunday, July 11, 2010 8:10 AM > > > Subject: [Rxtx] How to access /dev/ttyD0 using > java > > > program > > > > > > > > > > Hello guys, I have just bought external PCI > IO > > (2 > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > I have known and am able to access > /dev/ttyS0 > > > (ordinary serial port) but this external PCI IO, > > after > > > installation, it will create /dev/ttyD0 and > > /dev/ttyD1 > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > I have tried to execute > > > > rm -rf /dev/ttyS1 > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > rm -rf /dev/ttyS2 > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > and tried to access /dev/ttyS1 and > /dev/ttyS2 but > > it > > > is not stable on Linux Mandriva 2009.1 kernel > version > > > 2.6.27. > > > > > > > > Any other solution please ? > > > > Thank you. > > > > > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > From msemtd at googlemail.com Sun Jul 11 10:52:13 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:52:13 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: <241494.25390.qm@web76801.mail.sg1.yahoo.com> References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 11:07, Ferry Sumendap wrote: > I am trying to compile RXTX Source by executing > ./configure > conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > What does those log mean ? Hi Ferry, Looks like something in configure is supposed to define UTS_RELEASE but it isn't happening on your system for some reason. I rarely have compilation problems on my Linux boxes so I'm just guessing but I suggest you look at the source of configure to see what should define it. Google it too! Regards, Michael Erskine. From msemtd at googlemail.com Sun Jul 11 10:57:51 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 17:57:51 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On 11 July 2010 17:52, Michael Erskine wrote: > On 11 July 2010 11:07, Ferry Sumendap wrote: >> I am trying to compile RXTX Source by executing >> ./configure > >> conftest.c:8: error: 'UTS_RELEASE' undeclared (first use in this function) > >> What does those log mean ? > > Hi Ferry, > Looks like something in configure is supposed to define UTS_RELEASE > but it isn't happening on your system for some reason. I rarely have > compilation problems on my Linux boxes so I'm just guessing but I > suggest you look at the source of configure to see what should define > it. Google it too! Thirty seconds later: http://trac.nslu2-linux.org/optware/browser/trunk/sources/rxtx/no-UTS_RELEASE.patch Google will provide!! :) Looks like Redhat stopped defining UTS_RELEASE in their kernels and the lkml archives suggest that nobody should be using it in their source anyhow! I was out of my depth when I started looking at this a few minutes ago - everything just works on Debian boxes :p Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 11:20:21 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:20:21 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: On Sun, Jul 11, 2010 at 12:57 PM, Michael Erskine wrote: > I was out of my depth when I started looking at this a few minutes ago > - everything just works on Debian boxes :p Actually, Debian is doing the same thing: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch Just commenting out the part of the code where it throws the warning. Regards, Scott From showard314 at gmail.com Sun Jul 11 11:24:29 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 13:24:29 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: link to the patch: http://git.debian.org/?p=pkg-java/rxtx.git;a=blob;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD From msemtd at googlemail.com Sun Jul 11 13:51:43 2010 From: msemtd at googlemail.com (Michael Erskine) Date: Sun, 11 Jul 2010 20:51:43 +0100 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: OK, so some questions: - 1. what is the purpose of UTS_RELEASE? 2. why do lkml folks think it's bad form to use it in our code? 3. what should we be using instead? Let's fix it and get on with our lives :) Regards, Michael Erskine. From showard314 at gmail.com Sun Jul 11 17:37:51 2010 From: showard314 at gmail.com (Scott Howard) Date: Sun, 11 Jul 2010 19:37:51 -0400 Subject: [Rxtx] Compiling RXTX Source In-Reply-To: References: <241494.25390.qm@web76801.mail.sg1.yahoo.com> Message-ID: UTS_RELEASE is used for building kernel modules, and there are better ways of doing it now (when building modules). See: http://lkml.indiana.edu/hypermail/linux/kernel/0608.2/0394.html I think rxtx is just using UTS_RELEASE as a check to see if the kernel is different than the kernel that it was built against, then give the user a runtime warning. UTS_RELEASE used to be in linux/version.h and has now been moved to linux/utsrelease.h and is only included in the kernel headers package of most distributions (used mostly for making kernel modules.) The file name isn't correct in the above email, the name is now linux/utsrelease.h. This requires pulling in the kernel headers (whose packages and names are constantly changing in most distributions and there are hundreds of different flavors [1]) to build the package. Since there are so many different flavors, it is nearly guaranteed that many users will see this warning immediately and there is nothing that can be done about it besides build the package themselves (the build machines will be different flavors than some users). The Debian maintainer instead chose to just disable the checking, sacrificing a warning for the user in exchange for not pulling in the linux headers to build the package. Since the package won't build unless the kernel headers are installed (and patched something like [2]), maybe removing the commented out code from my previous link, or changing the warning to just being a message "this code was compiled with kernel: VERSION_NUM" would be simple and still get the same point across? Or we can define UTS_RELEASE ourselves by replacing "#include " with something like "# define UTS_RELEASE name.release" [3]. That builds, but I don't know if it replaced UTS_RELEASE with the string name.release or the return of name.release. [1] http://packages.debian.org/sid/linux-headers [2] Index: rxtx-2.2pre2/src/I2CImp.c =================================================================== --- rxtx-2.2pre2.orig/src/I2CImp.c 2010-07-11 17:54:42.114531942 -0400 +++ rxtx-2.2pre2/src/I2CImp.c 2010-07-11 18:00:58.039676872 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# include +# endif #endif extern int errno; similarly for src/RS485Imp.c, src/RawImp.c, src/SerialImp.c, src/SerialImp.cpp [3] Index: rxtx-2.2pre2/src/RS485Imp.c =================================================================== --- rxtx-2.2pre2.orig/src/RS485Imp.c 2010-07-11 18:44:16.279679409 -0400 +++ rxtx-2.2pre2/src/RS485Imp.c 2010-07-11 19:24:15.939683967 -0400 @@ -94,6 +94,9 @@ # include /* fix for linux-2.3.4? kernels */ # include # include +# ifndef UTS_RELEASE +# define UTS_RELEASE name.release +# endif #endif extern int errno; similarly for src/I2cImp.c, src/RawImp.c, src/SerialImp.c Regards, Scott From ferry_new2004 at yahoo.com Mon Jul 12 05:47:43 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:47:43 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <801250.71832.qm@web76815.mail.sg1.yahoo.com> Message-ID: <581477.29493.qm@web76801.mail.sg1.yahoo.com> Hello guys, finally I added parameter -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 and now the java program can access /dev/ttyD0 but only for root user not for ordinary user (non root). Does anyone know why this happen ? I need that ordinary user to be able to access the external serial port. Thank you very much. Regards, Ferry --- On Sun, 7/11/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Sunday, July 11, 2010, 3:07 AM > Thank you very much Mariusz.. > Now I understand what the problem is. > Thank you very much. > > Regards, > > Ferry > > --- On Sun, 7/11/10, M.Dec-GM > wrote: > > > From: M.Dec-GM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: "Ferry Sumendap" , > rxtx at qbang.org > > Date: Sunday, July 11, 2010, 2:10 AM > > This thread > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > Regards > > Mariusz > > > > ----- Original Message ----- > > From: "Ferry Sumendap" > > To: ; > > "M.Dec-GM" > > Sent: Sunday, July 11, 2010 10:48 AM > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java > > program > > > > > > I am sorry sir... > > What I mean with java program X is actually the > sample > > program how to access serial port using rxtx. Java > program X > > is not a complicated system.. I use the term X in > order to > > simplify the language of speaking. > > > > Can you give url to access your lastweek post ? > > > > Thank you very much. > > > > Regards, > > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 1:33 AM > > > Hi, > > > Did you read my post? > > > > > > Look for examples and obtain a list of available > ports > > in > > > RXTX. > > > If your port will be not available on standard > list, > > check > > > RXTX source, add a line with your ID and > everything > > will > > > work. > > > > > > Nobody can do it in your system. > > > In my two posts and discussions about port ID's > from > > few > > > weeks ago you have EVERYTHING to do it in your > system, > > so > > > more questions will not help more. > > > Simply do it. > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GMail" > > > Sent: Sunday, July 11, 2010 10:16 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I use java program X to print 'hello' to printer > > epson > > > tm88IV using ISA serial port which is internally > > inside > > > motherboard and it works successfully. > > > But when come to /dev/ttyD0, java program X > cannot > > access > > > (even to open the port /dev/ttyD0). > > > > > > After that, I executed : > > >? rm -rf /dev/ttyS1 > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > >? rm -rf /dev/ttyS2 > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > But when I want to test using java program X, > the > > program > > > can access /dev/ttyS1 but it doesn't print > 'hello' but > > it > > > prints figures I am not expecting it. > > > > > > > > > Any help would be appreciated much. > > > Thank you. > > > > > > Regards, > > > Ferry > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > wrote: > > > > > > > From: M.Dec-GMail > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > Hi, > > > > what for so complicated actions and what > does it > > mean > > > "but > > > > it is not stable" ???? > > > > "Not stable" may means that system crashes > or > > that > > > port > > > > disconnects..... > > > > > > > > Read carefully examples how to use RXTX (i.e > com > > port > > > > list). > > > > Few weeks ago was discussion about not > visible > > USB VCP > > > port > > > > id and how to solve this very little > problem. > > > > Regards > > > > Mariusz > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > Subject: [Rxtx] How to access /dev/ttyD0 > using > > java > > > > program > > > > > > > > > > > > > Hello guys, I have just bought external > PCI > > IO > > > (2 > > > > serial + 1 pararel) Moschip MCS9865IV-AA. > > > > > I have known and am able to access > > /dev/ttyS0 > > > > (ordinary serial port) but this external PCI > IO, > > > after > > > > installation, it will create /dev/ttyD0 and > > > /dev/ttyD1 > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > I have tried to execute > > > > > rm -rf /dev/ttyS1 > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > rm -rf /dev/ttyS2 > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > and tried to access /dev/ttyS1 and > > /dev/ttyS2 but > > > it > > > > is not stable on Linux Mandriva 2009.1 > kernel > > version > > > > 2.6.27. > > > > > > > > > > Any other solution please ? > > > > > Thank you. > > > > > > > > > > > > > > > Regards, > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ferry_new2004 at yahoo.com Mon Jul 12 05:57:14 2010 From: ferry_new2004 at yahoo.com (Ferry Sumendap) Date: Mon, 12 Jul 2010 19:57:14 +0800 (SGT) Subject: [Rxtx] How to access /dev/ttyD0 using java program Message-ID: <364026.1880.qm@web76813.mail.sg1.yahoo.com> For other information the group uucp has been assigned to the ordinary user but still cannot access the serial port. If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. Thank you. Regards, Ferry --- On Mon, 7/12/10, Ferry Sumendap wrote: > From: Ferry Sumendap > Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program > To: rxtx at qbang.org, "M.Dec-GM" > Date: Monday, July 12, 2010, 4:47 AM > Hello guys, finally I added > parameter > > -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 > > and now the java program can access /dev/ttyD0 but only for > root user not for ordinary user (non root). > > Does anyone know why this happen ? I need that ordinary > user to be able to access the external serial port. > Thank you very much. > > > Regards, > Ferry > > --- On Sun, 7/11/10, Ferry Sumendap > wrote: > > > From: Ferry Sumendap > > Subject: Re: [Rxtx] How to access /dev/ttyD0 using > java program > > To: rxtx at qbang.org, > "M.Dec-GM" > > Date: Sunday, July 11, 2010, 3:07 AM > > Thank you very much Mariusz.. > > Now I understand what the problem is. > > Thank you very much. > > > > Regards, > > > > Ferry > > > > --- On Sun, 7/11/10, M.Dec-GM > > wrote: > > > > > From: M.Dec-GM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java program > > > To: "Ferry Sumendap" , > > rxtx at qbang.org > > > Date: Sunday, July 11, 2010, 2:10 AM > > > This thread > > > > > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html > > > > > > > > > > > Regards > > > Mariusz > > > > > > ----- Original Message ----- > > > From: "Ferry Sumendap" > > > To: ; > > > "M.Dec-GM" > > > Sent: Sunday, July 11, 2010 10:48 AM > > > Subject: Re: [Rxtx] How to access /dev/ttyD0 > using > > java > > > program > > > > > > > > > I am sorry sir... > > > What I mean with java program X is actually the > > sample > > > program how to access serial port using rxtx. > Java > > program X > > > is not a complicated system.. I use the term X > in > > order to > > > simplify the language of speaking. > > > > > > Can you give url to access your lastweek post ? > > > > > > Thank you very much. > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GM > > > wrote: > > > > > > > From: M.Dec-GM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java program > > > > To: "Ferry Sumendap" , > > > rxtx at qbang.org > > > > Date: Sunday, July 11, 2010, 1:33 AM > > > > Hi, > > > > Did you read my post? > > > > > > > > Look for examples and obtain a list of > available > > ports > > > in > > > > RXTX. > > > > If your port will be not available on > standard > > list, > > > check > > > > RXTX source, add a line with your ID and > > everything > > > will > > > > work. > > > > > > > > Nobody can do it in your system. > > > > In my two posts and discussions about port > ID's > > from > > > few > > > > weeks ago you have EVERYTHING to do it in > your > > system, > > > so > > > > more questions will not help more. > > > > Simply do it. > > > > > > > > Regards > > > > Mariusz > > > > > > > > ----- Original Message ----- > > > > From: "Ferry Sumendap" > > > > To: ; > > > > "M.Dec-GMail" > > > > Sent: Sunday, July 11, 2010 10:16 AM > > > > Subject: Re: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > program > > > > > > > > > > > > I use java program X to print 'hello' to > printer > > > epson > > > > tm88IV using ISA serial port which is > internally > > > inside > > > > motherboard and it works successfully. > > > > But when come to /dev/ttyD0, java program X > > cannot > > > access > > > > (even to open the port /dev/ttyD0). > > > > > > > > After that, I executed : > > > >? rm -rf /dev/ttyS1 > > > >? ln -sf /dev/ttyD0 /dev/ttyS1 > > > >? rm -rf /dev/ttyS2 > > > >? ln -sf /dev/ttyD1 /dev/ttyS2 > > > > in order to make /dev/ttyS1 and /dev/ttyS2. > > > > > > > > But when I want to test using java program > X, > > the > > > program > > > > can access /dev/ttyS1 but it doesn't print > > 'hello' but > > > it > > > > prints figures I am not expecting it. > > > > > > > > > > > > Any help would be appreciated much. > > > > Thank you. > > > > > > > > Regards, > > > > Ferry > > > > > > > > > > > > > > > > --- On Sun, 7/11/10, M.Dec-GMail > > > > wrote: > > > > > > > > > From: M.Dec-GMail > > > > > Subject: Re: [Rxtx] How to access > > /dev/ttyD0 > > > using > > > > java program > > > > > To: "Ferry Sumendap" , > > > > rxtx at qbang.org > > > > > Date: Sunday, July 11, 2010, 1:01 AM > > > > > Hi, > > > > > what for so complicated actions and > what > > does it > > > mean > > > > "but > > > > > it is not stable" ???? > > > > > "Not stable" may means that system > crashes > > or > > > that > > > > port > > > > > disconnects..... > > > > > > > > > > Read carefully examples how to use RXTX > (i.e > > com > > > port > > > > > list). > > > > > Few weeks ago was discussion about not > > visible > > > USB VCP > > > > port > > > > > id and how to solve this very little > > problem. > > > > > Regards > > > > > Mariusz > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Ferry Sumendap" > > > > > To: > > > > > Sent: Sunday, July 11, 2010 8:10 AM > > > > > Subject: [Rxtx] How to access > /dev/ttyD0 > > using > > > java > > > > > program > > > > > > > > > > > > > > > > Hello guys, I have just bought > external > > PCI > > > IO > > > > (2 > > > > > serial + 1 pararel) Moschip > MCS9865IV-AA. > > > > > > I have known and am able to > access > > > /dev/ttyS0 > > > > > (ordinary serial port) but this > external PCI > > IO, > > > > after > > > > > installation, it will create /dev/ttyD0 > and > > > > /dev/ttyD1 > > > > > instead of /dev/ttyS1 and /dev/ttyS2. > > > > > > > > > > > > I have tried to execute > > > > > > rm -rf /dev/ttyS1 > > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 > > > > > > rm -rf /dev/ttyS2 > > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 > > > > > > > > > > > > and tried to access /dev/ttyS1 > and > > > /dev/ttyS2 but > > > > it > > > > > is not stable on Linux Mandriva 2009.1 > > kernel > > > version > > > > > 2.6.27. > > > > > > > > > > > > Any other solution please ? > > > > > > Thank you. > > > > > > > > > > > > > > > > > > Regards, > > > > > > Ferry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ? ? ? > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From drfaygo at gmail.com Mon Jul 12 06:36:08 2010 From: drfaygo at gmail.com (Paul Giblock) Date: Mon, 12 Jul 2010 08:36:08 -0400 Subject: [Rxtx] How to access /dev/ttyD0 using java program In-Reply-To: <364026.1880.qm@web76813.mail.sg1.yahoo.com> References: <364026.1880.qm@web76813.mail.sg1.yahoo.com> Message-ID: Which user:group owns /dev/ttyD0? Perhaps the owner is different since this device is added dynamically. -Paul On Mon, Jul 12, 2010 at 7:57 AM, Ferry Sumendap wrote: > For other information the group uucp has been assigned to the ordinary user ?but still cannot access the serial port. > If I test the internal serial port /dev/ttyS0 with ordinary user ( not root), it works perfectly. > Thank you. > > Regards, > Ferry > > --- On Mon, 7/12/10, Ferry Sumendap wrote: > >> From: Ferry Sumendap >> Subject: Re: [Rxtx] How to access /dev/ttyD0 using java program >> To: rxtx at qbang.org, "M.Dec-GM" >> Date: Monday, July 12, 2010, 4:47 AM >> Hello guys, finally I added >> parameter >> >> -Dgnu.io.rxtx.SerialPorts=/dev/ttyD0:/dev/ttyD1 >> >> and now the java program can access /dev/ttyD0 but only for >> root user not for ordinary user (non root). >> >> Does anyone know why this happen ? I need that ordinary >> user to be able to access the external serial port. >> Thank you very much. >> >> >> Regards, >> Ferry >> >> --- On Sun, 7/11/10, Ferry Sumendap >> wrote: >> >> > From: Ferry Sumendap >> > Subject: Re: [Rxtx] How to access /dev/ttyD0 using >> java program >> > To: rxtx at qbang.org, >> "M.Dec-GM" >> > Date: Sunday, July 11, 2010, 3:07 AM >> > Thank you very much Mariusz.. >> > Now I understand what the problem is. >> > Thank you very much. >> > >> > Regards, >> > >> > Ferry >> > >> > --- On Sun, 7/11/10, M.Dec-GM >> > wrote: >> > >> > > From: M.Dec-GM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java program >> > > To: "Ferry Sumendap" , >> > rxtx at qbang.org >> > > Date: Sunday, July 11, 2010, 2:10 AM >> > > This thread >> > > >> > > http://mailman.qbang.org/pipermail/rxtx/2010-June/6611157.html >> > >> > > >> > > >> > > Regards >> > > Mariusz >> > > >> > > ----- Original Message ----- >> > > From: "Ferry Sumendap" >> > > To: ; >> > > "M.Dec-GM" >> > > Sent: Sunday, July 11, 2010 10:48 AM >> > > Subject: Re: [Rxtx] How to access /dev/ttyD0 >> using >> > java >> > > program >> > > >> > > >> > > I am sorry sir... >> > > What I mean with java program X is actually the >> > sample >> > > program how to access serial port using rxtx. >> Java >> > program X >> > > is not a complicated system.. I use the term X >> in >> > order to >> > > simplify the language of speaking. >> > > >> > > Can you give url to access your lastweek post ? >> > > >> > > Thank you very much. >> > > >> > > Regards, >> > > >> > > Ferry >> > > >> > > >> > > >> > > >> > > >> > > --- On Sun, 7/11/10, M.Dec-GM >> > > wrote: >> > > >> > > > From: M.Dec-GM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java program >> > > > To: "Ferry Sumendap" , >> > > rxtx at qbang.org >> > > > Date: Sunday, July 11, 2010, 1:33 AM >> > > > Hi, >> > > > Did you read my post? >> > > > >> > > > Look for examples and obtain a list of >> available >> > ports >> > > in >> > > > RXTX. >> > > > If your port will be not available on >> standard >> > list, >> > > check >> > > > RXTX source, add a line with your ID and >> > everything >> > > will >> > > > work. >> > > > >> > > > Nobody can do it in your system. >> > > > In my two posts and discussions about port >> ID's >> > from >> > > few >> > > > weeks ago you have EVERYTHING to do it in >> your >> > system, >> > > so >> > > > more questions will not help more. >> > > > Simply do it. >> > > > >> > > > Regards >> > > > Mariusz >> > > > >> > > > ----- Original Message ----- >> > > > From: "Ferry Sumendap" >> > > > To: ; >> > > > "M.Dec-GMail" >> > > > Sent: Sunday, July 11, 2010 10:16 AM >> > > > Subject: Re: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > program >> > > > >> > > > >> > > > I use java program X to print 'hello' to >> printer >> > > epson >> > > > tm88IV using ISA serial port which is >> internally >> > > inside >> > > > motherboard and it works successfully. >> > > > But when come to /dev/ttyD0, java program X >> > cannot >> > > access >> > > > (even to open the port /dev/ttyD0). >> > > > >> > > > After that, I executed : >> > > >? rm -rf /dev/ttyS1 >> > > >? ln -sf /dev/ttyD0 /dev/ttyS1 >> > > >? rm -rf /dev/ttyS2 >> > > >? ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > in order to make /dev/ttyS1 and /dev/ttyS2. >> > > > >> > > > But when I want to test using java program >> X, >> > the >> > > program >> > > > can access /dev/ttyS1 but it doesn't print >> > 'hello' but >> > > it >> > > > prints figures I am not expecting it. >> > > > >> > > > >> > > > Any help would be appreciated much. >> > > > Thank you. >> > > > >> > > > Regards, >> > > > Ferry >> > > > >> > > > >> > > > >> > > > --- On Sun, 7/11/10, M.Dec-GMail >> > > > wrote: >> > > > >> > > > > From: M.Dec-GMail >> > > > > Subject: Re: [Rxtx] How to access >> > /dev/ttyD0 >> > > using >> > > > java program >> > > > > To: "Ferry Sumendap" , >> > > > rxtx at qbang.org >> > > > > Date: Sunday, July 11, 2010, 1:01 AM >> > > > > Hi, >> > > > > what for so complicated actions and >> what >> > does it >> > > mean >> > > > "but >> > > > > it is not stable" ???? >> > > > > "Not stable" may means that system >> crashes >> > or >> > > that >> > > > port >> > > > > disconnects..... >> > > > > >> > > > > Read carefully examples how to use RXTX >> (i.e >> > com >> > > port >> > > > > list). >> > > > > Few weeks ago was discussion about not >> > visible >> > > USB VCP >> > > > port >> > > > > id and how to solve this very little >> > problem. >> > > > > Regards >> > > > > Mariusz >> > > > > >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ferry Sumendap" >> > > > > To: >> > > > > Sent: Sunday, July 11, 2010 8:10 AM >> > > > > Subject: [Rxtx] How to access >> /dev/ttyD0 >> > using >> > > java >> > > > > program >> > > > > >> > > > > >> > > > > > Hello guys, I have just bought >> external >> > PCI >> > > IO >> > > > (2 >> > > > > serial + 1 pararel) Moschip >> MCS9865IV-AA. >> > > > > > I have known and am able to >> access >> > > /dev/ttyS0 >> > > > > (ordinary serial port) but this >> external PCI >> > IO, >> > > > after >> > > > > installation, it will create /dev/ttyD0 >> and >> > > > /dev/ttyD1 >> > > > > instead of /dev/ttyS1 and /dev/ttyS2. >> > > > > > >> > > > > > I have tried to execute >> > > > > > rm -rf /dev/ttyS1 >> > > > > > ln -sf /dev/ttyD0 /dev/ttyS1 >> > > > > > rm -rf /dev/ttyS2 >> > > > > > ln -sf /dev/ttyD1 /dev/ttyS2 >> > > > > > >> > > > > > and tried to access /dev/ttyS1 >> and >> > > /dev/ttyS2 but >> > > > it >> > > > > is not stable on Linux Mandriva 2009.1 >> > kernel >> > > version >> > > > > 2.6.27. >> > > > > > >> > > > > > Any other solution please ? >> > > > > > Thank you. >> > > > > > >> > > > > > >> > > > > > Regards, >> > > > > > Ferry >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > _______________________________________________ >> > > > > > Rxtx mailing list >> > > > > > Rxtx at qbang.org >> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > > >> > >> > >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> >> >> >